module port2RamDataInCrossBar (
    input wire clk,
    input wire rst,
    input wire [15:0] data_ready_in,
    input wire [31:0] data_in [0:15],
    input wire [5:0] data_priority_in [0:15],        //端口写入数据包的写入优先�??
    input wire [9:0] data_size_in [0:15],            //端口写入数据包的长度
    input wire [15:0] data_target_port_in [0:15],    //端口写入数据包的目的端口
    output reg [15:0] write_en_out,                   //端口的写入使�??
    output reg [5:0] data_priority_out [0:15],        //端口写入数据包的写入优先�??
    output reg [9:0] data_size_out [0:15],            //端口写入数据包的长度
    output reg [15:0] data_target_port_out [0:15],    //端口写入数据包的目的端口
    output reg [15:0] data_ready_out,
    output reg [31:0] data_out [0:15],
    output wire [15:0] port_pick
);
    wire [15:0] dataIn_arbitration [0:15];
    reg [15:0] history_arbitration [0:15];
    reg [1:0] data_write_state [0:15];
    integer j, k, m;

    //生成输出的数据信�?
    always @(posedge clk) begin
        if (rst) begin
            data_ready_out <= 16'h0000;
            write_en_out <= 16'h0000;
            for (k=0; k<16; k=k+1) begin
                data_write_state[k] <= 2'b00;
                data_priority_out[i] <= 0;
            end
        end
        else begin
            for (k=0; k<16; k=k+1) begin
                if (data_write_state[k]==2'b00) begin
                    if (dataIn_arbitration[k] == 16'h0000) begin
                        write_en_out[k] <= 0;
                        data_priority_out[k] <= 0;
                    end
                    else begin
                        for (j=0; j<16; j=j+1) begin
                            if (dataIn_arbitration[k][j]==1) begin
                                write_en_out[k] <= 1;
                                data_priority_out[k] <= data_priority_in[j];
                                data_size_out[k] <= data_size_in[j];
                                data_target_port_out[k] <= data_target_port_in[j];
                                data_write_state[k] <= 2'b01;
                                history_arbitration[k] <= dataIn_arbitration[k];
                            end
                        end
                    end
                end

                if (data_write_state[k]==2'b01) begin
                    if ((history_arbitration[k] & data_ready_in)>0) begin
                        for (m=0; m<16; m=m+1) begin
                            if (history_arbitration[k][m]==1) begin
                                data_ready_out[k] <= 1'b1;
                                data_out[k] <= data_in[m];
                            end
                        end

                        //拉低写仲裁信�?
                        write_en_out[k] <= 0;
                        data_priority_out[k] <= 0;
                        data_size_out[k] <= 0;
                        data_target_port_out[k] <= 0;
                        data_write_state[k] <= 2'b10;
                    end
                end

                if (data_write_state[k]==2'b10) begin
                    if ((history_arbitration[k] & data_ready_in)>0) begin
                        for (m=0; m<16; m=m+1) begin
                            if (history_arbitration[k][m]==1) begin
                                data_ready_out[k] <= 1'b1;
                                data_out[k] <= data_in[m];
                            end
                        end
                    end
                    else begin
                        data_ready_out[k] <= 1'b0;
                        data_out[k] <= 0;
                        history_arbitration[k] <= 0;
                        data_write_state[k] <= 2'b00;
                    end
                end
            end
        end
    end

    assign port_pick = dataIn_arbitration[0] | dataIn_arbitration[1] | dataIn_arbitration[2] | dataIn_arbitration[3] | dataIn_arbitration[4] | dataIn_arbitration[5] | dataIn_arbitration[6] | dataIn_arbitration[7] | dataIn_arbitration[8] | dataIn_arbitration[9] | dataIn_arbitration[10] | dataIn_arbitration[11] | dataIn_arbitration[12] | dataIn_arbitration[13] | dataIn_arbitration[14] | dataIn_arbitration[15];

    dataInMuxer16 mux1(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][0]), .write_en_2(data_target_port_in[1][0]), .write_en_3(data_target_port_in[2][0]), .write_en_4(data_target_port_in[3][0]), .write_en_5(data_target_port_in[4][0]), .write_en_6(data_target_port_in[5][0]), .write_en_7(data_target_port_in[6][0]), .write_en_8(data_target_port_in[7][0]), .write_en_9(data_target_port_in[8][0]), .write_en_10(data_target_port_in[9][0]), .write_en_11(data_target_port_in[10][0]), .write_en_12(data_target_port_in[11][0]), .write_en_13(data_target_port_in[12][0]), .write_en_14(data_target_port_in[13][0]), .write_en_15(data_target_port_in[14][0]), .write_en_16(data_target_port_in[15][0]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[0]));

    dataInMuxer16 mux2(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][1]), .write_en_2(data_target_port_in[1][1]), .write_en_3(data_target_port_in[2][1]), .write_en_4(data_target_port_in[3][1]), .write_en_5(data_target_port_in[4][1]), .write_en_6(data_target_port_in[5][1]), .write_en_7(data_target_port_in[6][1]), .write_en_8(data_target_port_in[7][1]), .write_en_9(data_target_port_in[8][1]), .write_en_10(data_target_port_in[9][1]), .write_en_11(data_target_port_in[10][1]), .write_en_12(data_target_port_in[11][1]), .write_en_13(data_target_port_in[12][1]), .write_en_14(data_target_port_in[13][1]), .write_en_15(data_target_port_in[14][1]), .write_en_16(data_target_port_in[15][1]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[1]));

    dataInMuxer16 mux3(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][2]), .write_en_2(data_target_port_in[1][2]), .write_en_3(data_target_port_in[2][2]), .write_en_4(data_target_port_in[3][2]), .write_en_5(data_target_port_in[4][2]), .write_en_6(data_target_port_in[5][2]), .write_en_7(data_target_port_in[6][2]), .write_en_8(data_target_port_in[7][2]), .write_en_9(data_target_port_in[8][2]), .write_en_10(data_target_port_in[9][2]), .write_en_11(data_target_port_in[10][2]), .write_en_12(data_target_port_in[11][2]), .write_en_13(data_target_port_in[12][2]), .write_en_14(data_target_port_in[13][2]), .write_en_15(data_target_port_in[14][2]), .write_en_16(data_target_port_in[15][2]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[2]));

    dataInMuxer16 mux4(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][3]), .write_en_2(data_target_port_in[1][3]), .write_en_3(data_target_port_in[2][3]), .write_en_4(data_target_port_in[3][3]), .write_en_5(data_target_port_in[4][3]), .write_en_6(data_target_port_in[5][3]), .write_en_7(data_target_port_in[6][3]), .write_en_8(data_target_port_in[7][3]), .write_en_9(data_target_port_in[8][3]), .write_en_10(data_target_port_in[9][3]), .write_en_11(data_target_port_in[10][3]), .write_en_12(data_target_port_in[11][3]), .write_en_13(data_target_port_in[12][3]), .write_en_14(data_target_port_in[13][3]), .write_en_15(data_target_port_in[14][3]), .write_en_16(data_target_port_in[15][3]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[3]));

    dataInMuxer16 mux5(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][4]), .write_en_2(data_target_port_in[1][4]), .write_en_3(data_target_port_in[2][4]), .write_en_4(data_target_port_in[3][4]), .write_en_5(data_target_port_in[4][4]), .write_en_6(data_target_port_in[5][4]), .write_en_7(data_target_port_in[6][4]), .write_en_8(data_target_port_in[7][4]), .write_en_9(data_target_port_in[8][4]), .write_en_10(data_target_port_in[9][4]), .write_en_11(data_target_port_in[10][4]), .write_en_12(data_target_port_in[11][4]), .write_en_13(data_target_port_in[12][4]), .write_en_14(data_target_port_in[13][4]), .write_en_15(data_target_port_in[14][4]), .write_en_16(data_target_port_in[15][4]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[4]));

    dataInMuxer16 mux6(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][5]), .write_en_2(data_target_port_in[1][5]), .write_en_3(data_target_port_in[2][5]), .write_en_4(data_target_port_in[3][5]), .write_en_5(data_target_port_in[4][5]), .write_en_6(data_target_port_in[5][5]), .write_en_7(data_target_port_in[6][5]), .write_en_8(data_target_port_in[7][5]), .write_en_9(data_target_port_in[8][5]), .write_en_10(data_target_port_in[9][5]), .write_en_11(data_target_port_in[10][5]), .write_en_12(data_target_port_in[11][5]), .write_en_13(data_target_port_in[12][5]), .write_en_14(data_target_port_in[13][5]), .write_en_15(data_target_port_in[14][5]), .write_en_16(data_target_port_in[15][5]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[5]));

    dataInMuxer16 mux7(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][6]), .write_en_2(data_target_port_in[1][6]), .write_en_3(data_target_port_in[2][6]), .write_en_4(data_target_port_in[3][6]), .write_en_5(data_target_port_in[4][6]), .write_en_6(data_target_port_in[5][6]), .write_en_7(data_target_port_in[6][6]), .write_en_8(data_target_port_in[7][6]), .write_en_9(data_target_port_in[8][6]), .write_en_10(data_target_port_in[9][6]), .write_en_11(data_target_port_in[10][6]), .write_en_12(data_target_port_in[11][6]), .write_en_13(data_target_port_in[12][6]), .write_en_14(data_target_port_in[13][6]), .write_en_15(data_target_port_in[14][6]), .write_en_16(data_target_port_in[15][6]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[6]));

    dataInMuxer16 mux8(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][7]), .write_en_2(data_target_port_in[1][7]), .write_en_3(data_target_port_in[2][7]), .write_en_4(data_target_port_in[3][7]), .write_en_5(data_target_port_in[4][7]), .write_en_6(data_target_port_in[5][7]), .write_en_7(data_target_port_in[6][7]), .write_en_8(data_target_port_in[7][7]), .write_en_9(data_target_port_in[8][7]), .write_en_10(data_target_port_in[9][7]), .write_en_11(data_target_port_in[10][7]), .write_en_12(data_target_port_in[11][7]), .write_en_13(data_target_port_in[12][7]), .write_en_14(data_target_port_in[13][7]), .write_en_15(data_target_port_in[14][7]), .write_en_16(data_target_port_in[15][7]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[7]));

    dataInMuxer16 mux9(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][8]), .write_en_2(data_target_port_in[1][8]), .write_en_3(data_target_port_in[2][8]), .write_en_4(data_target_port_in[3][8]), .write_en_5(data_target_port_in[4][8]), .write_en_6(data_target_port_in[5][8]), .write_en_7(data_target_port_in[6][8]), .write_en_8(data_target_port_in[7][8]), .write_en_9(data_target_port_in[8][8]), .write_en_10(data_target_port_in[9][8]), .write_en_11(data_target_port_in[10][8]), .write_en_12(data_target_port_in[11][8]), .write_en_13(data_target_port_in[12][8]), .write_en_14(data_target_port_in[13][8]), .write_en_15(data_target_port_in[14][8]), .write_en_16(data_target_port_in[15][8]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[8]));

    dataInMuxer16 mux10(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][9]), .write_en_2(data_target_port_in[1][9]), .write_en_3(data_target_port_in[2][9]), .write_en_4(data_target_port_in[3][9]), .write_en_5(data_target_port_in[4][9]), .write_en_6(data_target_port_in[5][9]), .write_en_7(data_target_port_in[6][9]), .write_en_8(data_target_port_in[7][9]), .write_en_9(data_target_port_in[8][9]), .write_en_10(data_target_port_in[9][9]), .write_en_11(data_target_port_in[10][9]), .write_en_12(data_target_port_in[11][9]), .write_en_13(data_target_port_in[12][9]), .write_en_14(data_target_port_in[13][9]), .write_en_15(data_target_port_in[14][9]), .write_en_16(data_target_port_in[15][9]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[9]));

    dataInMuxer16 mux11(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][10]), .write_en_2(data_target_port_in[1][10]), .write_en_3(data_target_port_in[2][10]), .write_en_4(data_target_port_in[3][10]), .write_en_5(data_target_port_in[4][10]), .write_en_6(data_target_port_in[5][10]), .write_en_7(data_target_port_in[6][10]), .write_en_8(data_target_port_in[7][10]), .write_en_9(data_target_port_in[8][10]), .write_en_10(data_target_port_in[9][10]), .write_en_11(data_target_port_in[10][10]), .write_en_12(data_target_port_in[11][10]), .write_en_13(data_target_port_in[12][10]), .write_en_14(data_target_port_in[13][10]), .write_en_15(data_target_port_in[14][10]), .write_en_16(data_target_port_in[15][10]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[10]));

    dataInMuxer16 mux12(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][11]), .write_en_2(data_target_port_in[1][11]), .write_en_3(data_target_port_in[2][11]), .write_en_4(data_target_port_in[3][11]), .write_en_5(data_target_port_in[4][11]), .write_en_6(data_target_port_in[5][11]), .write_en_7(data_target_port_in[6][11]), .write_en_8(data_target_port_in[7][11]), .write_en_9(data_target_port_in[8][11]), .write_en_10(data_target_port_in[9][11]), .write_en_11(data_target_port_in[10][11]), .write_en_12(data_target_port_in[11][11]), .write_en_13(data_target_port_in[12][11]), .write_en_14(data_target_port_in[13][11]), .write_en_15(data_target_port_in[14][11]), .write_en_16(data_target_port_in[15][11]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[11]));

    dataInMuxer16 mux13(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][12]), .write_en_2(data_target_port_in[1][12]), .write_en_3(data_target_port_in[2][12]), .write_en_4(data_target_port_in[3][12]), .write_en_5(data_target_port_in[4][12]), .write_en_6(data_target_port_in[5][12]), .write_en_7(data_target_port_in[6][12]), .write_en_8(data_target_port_in[7][12]), .write_en_9(data_target_port_in[8][12]), .write_en_10(data_target_port_in[9][12]), .write_en_11(data_target_port_in[10][12]), .write_en_12(data_target_port_in[11][12]), .write_en_13(data_target_port_in[12][12]), .write_en_14(data_target_port_in[13][12]), .write_en_15(data_target_port_in[14][12]), .write_en_16(data_target_port_in[15][12]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[12]));

    dataInMuxer16 mux14(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][13]), .write_en_2(data_target_port_in[1][13]), .write_en_3(data_target_port_in[2][13]), .write_en_4(data_target_port_in[3][13]), .write_en_5(data_target_port_in[4][13]), .write_en_6(data_target_port_in[5][13]), .write_en_7(data_target_port_in[6][13]), .write_en_8(data_target_port_in[7][13]), .write_en_9(data_target_port_in[8][13]), .write_en_10(data_target_port_in[9][13]), .write_en_11(data_target_port_in[10][13]), .write_en_12(data_target_port_in[11][13]), .write_en_13(data_target_port_in[12][13]), .write_en_14(data_target_port_in[13][13]), .write_en_15(data_target_port_in[14][13]), .write_en_16(data_target_port_in[15][13]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[13]));

    dataInMuxer16 mux15(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][14]), .write_en_2(data_target_port_in[1][14]), .write_en_3(data_target_port_in[2][14]), .write_en_4(data_target_port_in[3][14]), .write_en_5(data_target_port_in[4][14]), .write_en_6(data_target_port_in[5][14]), .write_en_7(data_target_port_in[6][14]), .write_en_8(data_target_port_in[7][14]), .write_en_9(data_target_port_in[8][14]), .write_en_10(data_target_port_in[9][14]), .write_en_11(data_target_port_in[10][14]), .write_en_12(data_target_port_in[11][14]), .write_en_13(data_target_port_in[12][14]), .write_en_14(data_target_port_in[13][14]), .write_en_15(data_target_port_in[14][14]), .write_en_16(data_target_port_in[15][14]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[14]));

    dataInMuxer16 mux16(.clk(clk), .rst(rst), 
                    .write_en_1(data_target_port_in[0][15]), .write_en_2(data_target_port_in[1][15]), .write_en_3(data_target_port_in[2][15]), .write_en_4(data_target_port_in[3][15]), .write_en_5(data_target_port_in[4][15]), .write_en_6(data_target_port_in[5][15]), .write_en_7(data_target_port_in[6][15]), .write_en_8(data_target_port_in[7][15]), .write_en_9(data_target_port_in[8][15]), .write_en_10(data_target_port_in[9][15]), .write_en_11(data_target_port_in[10][15]), .write_en_12(data_target_port_in[11][15]), .write_en_13(data_target_port_in[12][15]), .write_en_14(data_target_port_in[13][15]), .write_en_15(data_target_port_in[14][15]), .write_en_16(data_target_port_in[15][15]), 
                    .write_priority_in_1(data_priority_in[0]), .write_priority_in_2(data_priority_in[1]), .write_priority_in_3(data_priority_in[2]), .write_priority_in_4(data_priority_in[3]), .write_priority_in_5(data_priority_in[4]), .write_priority_in_6(data_priority_in[5]), .write_priority_in_7(data_priority_in[6]), .write_priority_in_8(data_priority_in[7]), .write_priority_in_9(data_priority_in[8]), .write_priority_in_10(data_priority_in[9]), .write_priority_in_11(data_priority_in[10]), .write_priority_in_12(data_priority_in[11]), .write_priority_in_13(data_priority_in[12]), .write_priority_in_14(data_priority_in[13]), .write_priority_in_15(data_priority_in[14]), .write_priority_in_16(data_priority_in[15]), 
                    .write_arbitration(dataIn_arbitration[15]));
endmodule